package com.example.demospringmybatisplus.processors;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demospringmybatisplus.mapper.NodeMapper;
import com.example.demospringmybatisplus.vo.BaseDataVo;
import com.example.demospringmybatisplus.vo.NodeVo;
import com.example.demospringmybatisplus.vo.SearchVo;

/**
 * node业务处理类
 *
 * @DATE 2024/5/3
 **/
@Service
public class NodeProcessorService extends AbstractDataProcessor{
    @Autowired
    private NodeMapper nodeMapper;
    @Override
    protected List<? extends BaseDataVo> findPagedList(SearchVo searchVo, String tableName) {
        QueryWrapper<NodeVo> nodeVoQueryWrapper = new QueryWrapper<>();
        nodeVoQueryWrapper.eq("esn",searchVo.getEsn());
        nodeVoQueryWrapper.eq("name",searchVo.getName());
        return nodeMapper.selectList(nodeVoQueryWrapper);
    }
}
